<template>
  <div style="padding:10px;">
    <div class="list">
      <input
        @click="item.checked = !true"
        v-model="item.checked"
        type="checkbox"
      />
      <img :src="item.img" alt="" />
      <div class="rightSc">
        <div>
          <span>{{ item.name }}</span>
        </div>
        <div class="cartbTOM">
          <p style="color:red;"></p>
          <p>
            <button @click="item.num > 1 ? item.num-- : item.num">-</button
            ><input v-model="item.num" class="inputss" type="text" />
            <button @click="item.num++">+</button>
          </p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["item"],
};
</script>

<style lang="scss" scoped>
[type="checkbox"] {
  width: 20px;
  height: 20px;
}
.list {
  width: 100%;
  height: 8rem;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cartbTOM {
  display: flex;
  justify-content: space-around;
}
button {
  width: 20px;
}
img {
  width: 100px;
  height: 80%;
}
.rightSc {
  width: 60%;
}
.inputss {
  width: 30px;
}
span {
  font-size: 12px;
}
</style>
